<?php
//dbconnector.php
//Define the mysql connection variables.
	define ("MYSQLHOST", "conocepunta.com.ar");
	define ("MYSQLUSER", "conoce_consult");
	define ("MYSQLPASS", "consult");
	define ("MYSQLDB", "conoce_db");
	function opendatabase(){
		$db = mysql_connect (MYSQLHOST,MYSQLUSER,MYSQLPASS);			
		try {
			if (!$db){
				$exceptionstring = "Error connecting to database: <br />";
				$exceptionstring .= mysql_errno() . ": " . mysql_error();
				throw new exception ($exceptionstring);
			} else {
				mysql_select_db (MYSQLDB,$db);
			}
			return $db;
		} catch (exception $e) {
			echo $e->getmessage();
			die();
		}
	}
?>